package com.atom.process.cnmuseum.bm.dao.task;

import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Repository;

import com.atom.common.dao.AvensCommonDao;
import com.atom.common.mb.entity.gl.TrackmessageDO;
import com.atom.common.remote.user.UserUtil;
import com.atom.process.cnmuseum.bm.entity.task.BmTrackmessageTaskDO;

@Repository
public class BmTrackmessageTaskDao extends AvensCommonDao<BmTrackmessageTaskDO>{

	public void createADO(UserUtil user, String processInstanceId, String taskId, TrackmessageDO trackmessage) {
		// TODO Auto-generated method stub
		BmTrackmessageTaskDO ado = new BmTrackmessageTaskDO();
        BeanUtils.copyProperties(trackmessage, ado, "id");
        ado.setProcessId(processInstanceId);
        ado.setTaskId(taskId);
        save(ado);
	}

	public List<BmTrackmessageTaskDO> findByTaskId(String taskId) {
		// TODO Auto-generated method stub
        List<BmTrackmessageTaskDO> list = super.findByProperty("taskId", taskId);
        return list;
	}
	
	

}
